package com.yl.student.handler;

import com.yl.student.bean.dto.ResponseShoppingInfoDto;
import com.yl.student.service.ShopperAndShoppingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * 商家、商品的操作类
 */
@Controller
@Slf4j
public class ShopperAndShopping {
    @Resource
    private ShopperAndShoppingService shopperAndShoppingService;

    @GetMapping("/getAllShoppingInfoByShopperId")
    @ResponseBody
    public ResponseShoppingInfoDto getAllShoppingInfoByShopperId(@RequestParam("shopperId") String shopperId){
        return shopperAndShoppingService.getAllShoppingInfoByShopperId(shopperId);
    }
}
